package com.junmoo.www.auth.module.system.controller;


import lombok.extern.slf4j.Slf4j;

import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/resource")
@Slf4j
public class SysMenuController {
//    @Autowired
//    SysResourceService sysResourceService;
//    @ApiOperation("查看所有资源信息")
//    @GetMapping("/findAll")
//    public Result findAll(){
//        return Result.success("success",sysResourceService.findAll());
//    }
//
//    @GetMapping("/page")
//    public Result page(SysResource search, Integer currentPage, Integer pageSize,
//                       @RequestParam(defaultValue = "resourceCode") String sortField, @RequestParam(defaultValue = "asc")String sortOrder){
//        Sort.Direction direction= sortOrder.toLowerCase().contains("asc")?Sort.Direction.ASC:Sort.Direction.DESC;
//        Pageable pageable = PageRequest.of(currentPage - 1, pageSize,Sort.by(direction,sortField));
//        Page<SysResource> page =  sysResourceService.page( search, pageable);
//        return Result.success(page);
//    }
//    @ApiOperation("新增")
//    @PostMapping()
//    public Result create(@RequestBody SysResource entity){
//        return  sysResourceService.create( entity);
//    }
//    @ApiOperation("编辑")
//    @PutMapping()
//    public Result edit(@RequestBody SysResource entity){
//        return  sysResourceService.edit( entity);
//    }
//    @ApiOperation("删除")
//    @DeleteMapping()
//    public Result deleteByIds(@RequestBody List<Number> ids){
//        return  sysResourceService.deleteByIds( ids);
//    }
}
